<?php
/**
 * Created by IntelliJ IDEA.
 * User: wanglu
 * Date: 17/4/12
 * Time: 17:43
 */
class SUser_model extends AdminModel {

    const TABLE_MEMBERS_USER = "members";

    function __construct() {
        parent::__construct();
        $this->db = $this->load->database('slightech', TRUE);
    }

    public function get_users($start, $length, $emial, $order_by_createtime) {

        if (!empty($emial)) {
            $this->db->like('email', $emial);

            $this->db->or_like('username', $emial);

            $this->db->or_like('uid', $emial);
        }



        $orderby = array("regdate" => $order_by_createtime);
        return $this->getPageDataTables($start, $length, self::TABLE_MEMBERS_USER, $orderby);
    }

    
}